/**
 * @file recursiveFibo.c
 * @author liu6tot (you@domain.com)
 * @brief 递归方式求Fibonacci数列
 * @version 0.1
 * @date 2022-11-09
 * 
 * @copyright Copyright (c) 2022
 * 
 */
#include <stdio.h>
long recursiveFibo(long);
int main(){
    long n;
    /* 输出fibonacci数列的第n项，n由键盘读入*/
    scanf("%d",&n);
    printf("The %dth item of Fibonacci Series is %d",n,recursiveFibo(n));
    return 0;
}
long recursiveFibo(long n){
    /*思考 Fibonacci数列定义
    F(n) =F(n-1)+F(n-2)
    F(0)=F(1)=1
    */
    long res;
    if(n == 1 || n == 2){
        return 1;
    }
    if(n>2){
        return recursiveFibo(n-1) + recursiveFibo(n-2);
    }
    return 0;
}